package com.zts.base.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Created by Zhangkh on 2017/6/6.
 */
@Configuration
@EnableSwagger2
//@ComponentScan(basePackages = {"com.zts.*.*.controller"})
//@EnableWebMvc
public class CommonConfig {
    //制定swagger的信息
    @Bean
    public Docket createRestApi() {
        ApiInfo apiInfo = new ApiInfoBuilder().title("Apollo RESTful APIs").version("1").build();
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(apiInfo);
    }


}
